#include<stdio.h>
int main()
{
    int n,cont=0;
    if (scanf("%d",&n))
    {
        while (n!=1)
        {
            if (n%2==0)
            {
                n=n/2;
                cont++;
            }    
            else
            {
                n=(3*n+1)/2;
                cont++;
        }
    }
    printf("%d",cont);
    }
    return 0;
}
